package com.example.demo.controller;

import com.example.demo.entity.UserElegance;
import com.example.demo.service.UserEleganceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: Bin.L
 * @date: 2021/3/12 0012 15:03
 * @Description:
 */
@Api(tags="UserElegance Use")
@RestController
@RequestMapping("/user")
@Slf4j
public class UserEleganceController {

    @Autowired
    UserEleganceService service;


    @PostMapping("/save")
    @ApiOperation(value="Add userElegance", notes="详细描述")
    public void saveUserElegance(@RequestBody UserElegance userElegance){
        Assert.notNull(userElegance," user is null");
        log.info(" request param：{}", userElegance.toString());
        service.saveUserElegance(userElegance);
    }

}
